<template>
	<w-layout showNavbar navTitle="用户协议"  navTitleColor="#fff" :navBackgroundColor="publicStyles['--color']">
		<template #default>
			<view class="container">
				<rich-text :nodes="content"></rich-text>
			</view>
		</template>
	</w-layout>
</template>

<script setup>
	import {
		ref,
		reactive,
		onMounted,
		computed,
		nextTick
	} from 'vue'
	import {
		onLoad
	} from '@dcloudio/uni-app'
	import {
		useAppStore
	} from '@/store/app'
	import {
		getAgreement
	} from '@/utils/request/api';
	import {
		storeToRefs
	} from 'pinia'
	import {
		useColorStore
	} from '@/store/color'
	const colorStore = useColorStore()
	const {
		publicStyles
	} = storeToRefs(colorStore)
	const appStore = useAppStore()
	const content = ref('')
	onLoad((options) => {})
	onMounted(() => {
		nextTick(() => {
			appStore.loadingHandler(false)
		})
		getAgreement({
		}).then(res=>{
			content.value = res
		})
	})
</script>

<style lang="scss">
	.shadow {
		box-shadow: 2rpx 2rpx 12rpx var(--shadow);
	}

	.container {
		width: 100%;
		min-height: 100%;
		position: relative;
		overflow: hidden;
		box-sizing: border-box;
		padding: 30rpx;
		
	}
</style>